package tds.model27;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName Client
 * @Description TODO（这里用一句话描述这个类的作用)
 * @author tds
 * @Date 2020/2/8 16:12
 * @version 1.0.0
 */
public class Client {
    public static void main(String[] args) {
        ChessFlyWeight chess1 = ChessFlyWeightFactory.getChess("黑色");
        ChessFlyWeight chess2 = ChessFlyWeightFactory.getChess("黑色");
        System.out.println(chess1 == chess2);

        // 增加外部状态处理
        chess1.display(new Coordinate(10, 10));
        chess2.display(new Coordinate(11, 12));
    }
}
